package com.molin.threadTest.blockingQueueTest;

import java.util.concurrent.ArrayBlockingQueue;

public class Demo01 {
    public static void main(String[] args) throws InterruptedException {
        ArrayBlockingQueue<String> arrayBlockingQueue = new ArrayBlockingQueue<>(1);

        //存
        arrayBlockingQueue.put("汉堡包");
        //取
        System.out.println(arrayBlockingQueue.take());

    }
}